{
  "cells": [
    {
      "cell_type": "code",
      "source": [
        "import pandas"
      ],
      "outputs": [],
      "execution_count": 3,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "pandas.__version__"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 4,
          "data": {
            "text/plain": [
              "'0.24.2'"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 4,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "pandas.read_csv('../data/gapminder.tsv', sep='\\t')"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 5,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1952</td>\n",
              "      <td>28.801</td>\n",
              "      <td>8425333</td>\n",
              "      <td>779.445314</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1957</td>\n",
              "      <td>30.332</td>\n",
              "      <td>9240934</td>\n",
              "      <td>820.853030</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1962</td>\n",
              "      <td>31.997</td>\n",
              "      <td>10267083</td>\n",
              "      <td>853.100710</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1967</td>\n",
              "      <td>34.020</td>\n",
              "      <td>11537966</td>\n",
              "      <td>836.197138</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1972</td>\n",
              "      <td>36.088</td>\n",
              "      <td>13079460</td>\n",
              "      <td>739.981106</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1977</td>\n",
              "      <td>38.438</td>\n",
              "      <td>14880372</td>\n",
              "      <td>786.113360</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1982</td>\n",
              "      <td>39.854</td>\n",
              "      <td>12881816</td>\n",
              "      <td>978.011439</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1987</td>\n",
              "      <td>40.822</td>\n",
              "      <td>13867957</td>\n",
              "      <td>852.395945</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1992</td>\n",
              "      <td>41.674</td>\n",
              "      <td>16317921</td>\n",
              "      <td>649.341395</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1997</td>\n",
              "      <td>41.763</td>\n",
              "      <td>22227415</td>\n",
              "      <td>635.341351</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2002</td>\n",
              "      <td>42.129</td>\n",
              "      <td>25268405</td>\n",
              "      <td>726.734055</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2007</td>\n",
              "      <td>43.828</td>\n",
              "      <td>31889923</td>\n",
              "      <td>974.580338</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1952</td>\n",
              "      <td>55.230</td>\n",
              "      <td>1282697</td>\n",
              "      <td>1601.056136</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>13</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1957</td>\n",
              "      <td>59.280</td>\n",
              "      <td>1476505</td>\n",
              "      <td>1942.284244</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>14</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1962</td>\n",
              "      <td>64.820</td>\n",
              "      <td>1728137</td>\n",
              "      <td>2312.888958</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>15</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1967</td>\n",
              "      <td>66.220</td>\n",
              "      <td>1984060</td>\n",
              "      <td>2760.196931</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>16</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1972</td>\n",
              "      <td>67.690</td>\n",
              "      <td>2263554</td>\n",
              "      <td>3313.422188</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>17</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1977</td>\n",
              "      <td>68.930</td>\n",
              "      <td>2509048</td>\n",
              "      <td>3533.003910</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>18</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1982</td>\n",
              "      <td>70.420</td>\n",
              "      <td>2780097</td>\n",
              "      <td>3630.880722</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>19</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1987</td>\n",
              "      <td>72.000</td>\n",
              "      <td>3075321</td>\n",
              "      <td>3738.932735</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>20</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1992</td>\n",
              "      <td>71.581</td>\n",
              "      <td>3326498</td>\n",
              "      <td>2497.437901</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1997</td>\n",
              "      <td>72.950</td>\n",
              "      <td>3428038</td>\n",
              "      <td>3193.054604</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>22</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>2002</td>\n",
              "      <td>75.651</td>\n",
              "      <td>3508512</td>\n",
              "      <td>4604.211737</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>23</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>2007</td>\n",
              "      <td>76.423</td>\n",
              "      <td>3600523</td>\n",
              "      <td>5937.029526</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>24</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1952</td>\n",
              "      <td>43.077</td>\n",
              "      <td>9279525</td>\n",
              "      <td>2449.008185</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>25</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1957</td>\n",
              "      <td>45.685</td>\n",
              "      <td>10270856</td>\n",
              "      <td>3013.976023</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>26</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1962</td>\n",
              "      <td>48.303</td>\n",
              "      <td>11000948</td>\n",
              "      <td>2550.816880</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>27</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1967</td>\n",
              "      <td>51.407</td>\n",
              "      <td>12760499</td>\n",
              "      <td>3246.991771</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>28</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1972</td>\n",
              "      <td>54.518</td>\n",
              "      <td>14760787</td>\n",
              "      <td>4182.663766</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>29</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1977</td>\n",
              "      <td>58.014</td>\n",
              "      <td>17152804</td>\n",
              "      <td>4910.416756</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1674</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1982</td>\n",
              "      <td>49.113</td>\n",
              "      <td>9657618</td>\n",
              "      <td>1977.557010</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1675</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1987</td>\n",
              "      <td>52.922</td>\n",
              "      <td>11219340</td>\n",
              "      <td>1971.741538</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1676</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1992</td>\n",
              "      <td>55.599</td>\n",
              "      <td>13367997</td>\n",
              "      <td>1879.496673</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1677</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1997</td>\n",
              "      <td>58.020</td>\n",
              "      <td>15826497</td>\n",
              "      <td>2117.484526</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1678</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2002</td>\n",
              "      <td>60.308</td>\n",
              "      <td>18701257</td>\n",
              "      <td>2234.820827</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1679</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2007</td>\n",
              "      <td>62.698</td>\n",
              "      <td>22211743</td>\n",
              "      <td>2280.769906</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1680</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1952</td>\n",
              "      <td>42.038</td>\n",
              "      <td>2672000</td>\n",
              "      <td>1147.388831</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1681</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1957</td>\n",
              "      <td>44.077</td>\n",
              "      <td>3016000</td>\n",
              "      <td>1311.956766</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1682</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1962</td>\n",
              "      <td>46.023</td>\n",
              "      <td>3421000</td>\n",
              "      <td>1452.725766</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1683</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1967</td>\n",
              "      <td>47.768</td>\n",
              "      <td>3900000</td>\n",
              "      <td>1777.077318</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1684</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1972</td>\n",
              "      <td>50.107</td>\n",
              "      <td>4506497</td>\n",
              "      <td>1773.498265</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1685</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1977</td>\n",
              "      <td>51.386</td>\n",
              "      <td>5216550</td>\n",
              "      <td>1588.688299</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1686</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1982</td>\n",
              "      <td>51.821</td>\n",
              "      <td>6100407</td>\n",
              "      <td>1408.678565</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1687</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1987</td>\n",
              "      <td>50.821</td>\n",
              "      <td>7272406</td>\n",
              "      <td>1213.315116</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1688</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1992</td>\n",
              "      <td>46.100</td>\n",
              "      <td>8381163</td>\n",
              "      <td>1210.884633</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1689</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1997</td>\n",
              "      <td>40.238</td>\n",
              "      <td>9417789</td>\n",
              "      <td>1071.353818</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1690</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2002</td>\n",
              "      <td>39.193</td>\n",
              "      <td>10595811</td>\n",
              "      <td>1071.613938</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1691</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2007</td>\n",
              "      <td>42.384</td>\n",
              "      <td>11746035</td>\n",
              "      <td>1271.211593</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1692</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1952</td>\n",
              "      <td>48.451</td>\n",
              "      <td>3080907</td>\n",
              "      <td>406.884115</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1693</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1957</td>\n",
              "      <td>50.469</td>\n",
              "      <td>3646340</td>\n",
              "      <td>518.764268</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1694</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1962</td>\n",
              "      <td>52.358</td>\n",
              "      <td>4277736</td>\n",
              "      <td>527.272182</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1695</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1967</td>\n",
              "      <td>53.995</td>\n",
              "      <td>4995432</td>\n",
              "      <td>569.795071</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1696</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1972</td>\n",
              "      <td>55.635</td>\n",
              "      <td>5861135</td>\n",
              "      <td>799.362176</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1697</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1977</td>\n",
              "      <td>57.674</td>\n",
              "      <td>6642107</td>\n",
              "      <td>685.587682</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1698</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1982</td>\n",
              "      <td>60.363</td>\n",
              "      <td>7636524</td>\n",
              "      <td>788.855041</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1699</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1987</td>\n",
              "      <td>62.351</td>\n",
              "      <td>9216418</td>\n",
              "      <td>706.157306</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1700</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1992</td>\n",
              "      <td>60.377</td>\n",
              "      <td>10704340</td>\n",
              "      <td>693.420786</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1701</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1997</td>\n",
              "      <td>46.809</td>\n",
              "      <td>11404948</td>\n",
              "      <td>792.449960</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1702</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2002</td>\n",
              "      <td>39.989</td>\n",
              "      <td>11926563</td>\n",
              "      <td>672.038623</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1703</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2007</td>\n",
              "      <td>43.487</td>\n",
              "      <td>12311143</td>\n",
              "      <td>469.709298</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>1704 rows × 6 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "          country continent  year  lifeExp       pop    gdpPercap\n",
              "0     Afghanistan      Asia  1952   28.801   8425333   779.445314\n",
              "1     Afghanistan      Asia  1957   30.332   9240934   820.853030\n",
              "2     Afghanistan      Asia  1962   31.997  10267083   853.100710\n",
              "3     Afghanistan      Asia  1967   34.020  11537966   836.197138\n",
              "4     Afghanistan      Asia  1972   36.088  13079460   739.981106\n",
              "5     Afghanistan      Asia  1977   38.438  14880372   786.113360\n",
              "6     Afghanistan      Asia  1982   39.854  12881816   978.011439\n",
              "7     Afghanistan      Asia  1987   40.822  13867957   852.395945\n",
              "8     Afghanistan      Asia  1992   41.674  16317921   649.341395\n",
              "9     Afghanistan      Asia  1997   41.763  22227415   635.341351\n",
              "10    Afghanistan      Asia  2002   42.129  25268405   726.734055\n",
              "11    Afghanistan      Asia  2007   43.828  31889923   974.580338\n",
              "12        Albania    Europe  1952   55.230   1282697  1601.056136\n",
              "13        Albania    Europe  1957   59.280   1476505  1942.284244\n",
              "14        Albania    Europe  1962   64.820   1728137  2312.888958\n",
              "15        Albania    Europe  1967   66.220   1984060  2760.196931\n",
              "16        Albania    Europe  1972   67.690   2263554  3313.422188\n",
              "17        Albania    Europe  1977   68.930   2509048  3533.003910\n",
              "18        Albania    Europe  1982   70.420   2780097  3630.880722\n",
              "19        Albania    Europe  1987   72.000   3075321  3738.932735\n",
              "20        Albania    Europe  1992   71.581   3326498  2497.437901\n",
              "21        Albania    Europe  1997   72.950   3428038  3193.054604\n",
              "22        Albania    Europe  2002   75.651   3508512  4604.211737\n",
              "23        Albania    Europe  2007   76.423   3600523  5937.029526\n",
              "24        Algeria    Africa  1952   43.077   9279525  2449.008185\n",
              "25        Algeria    Africa  1957   45.685  10270856  3013.976023\n",
              "26        Algeria    Africa  1962   48.303  11000948  2550.816880\n",
              "27        Algeria    Africa  1967   51.407  12760499  3246.991771\n",
              "28        Algeria    Africa  1972   54.518  14760787  4182.663766\n",
              "29        Algeria    Africa  1977   58.014  17152804  4910.416756\n",
              "...           ...       ...   ...      ...       ...          ...\n",
              "1674  Yemen, Rep.      Asia  1982   49.113   9657618  1977.557010\n",
              "1675  Yemen, Rep.      Asia  1987   52.922  11219340  1971.741538\n",
              "1676  Yemen, Rep.      Asia  1992   55.599  13367997  1879.496673\n",
              "1677  Yemen, Rep.      Asia  1997   58.020  15826497  2117.484526\n",
              "1678  Yemen, Rep.      Asia  2002   60.308  18701257  2234.820827\n",
              "1679  Yemen, Rep.      Asia  2007   62.698  22211743  2280.769906\n",
              "1680       Zambia    Africa  1952   42.038   2672000  1147.388831\n",
              "1681       Zambia    Africa  1957   44.077   3016000  1311.956766\n",
              "1682       Zambia    Africa  1962   46.023   3421000  1452.725766\n",
              "1683       Zambia    Africa  1967   47.768   3900000  1777.077318\n",
              "1684       Zambia    Africa  1972   50.107   4506497  1773.498265\n",
              "1685       Zambia    Africa  1977   51.386   5216550  1588.688299\n",
              "1686       Zambia    Africa  1982   51.821   6100407  1408.678565\n",
              "1687       Zambia    Africa  1987   50.821   7272406  1213.315116\n",
              "1688       Zambia    Africa  1992   46.100   8381163  1210.884633\n",
              "1689       Zambia    Africa  1997   40.238   9417789  1071.353818\n",
              "1690       Zambia    Africa  2002   39.193  10595811  1071.613938\n",
              "1691       Zambia    Africa  2007   42.384  11746035  1271.211593\n",
              "1692     Zimbabwe    Africa  1952   48.451   3080907   406.884115\n",
              "1693     Zimbabwe    Africa  1957   50.469   3646340   518.764268\n",
              "1694     Zimbabwe    Africa  1962   52.358   4277736   527.272182\n",
              "1695     Zimbabwe    Africa  1967   53.995   4995432   569.795071\n",
              "1696     Zimbabwe    Africa  1972   55.635   5861135   799.362176\n",
              "1697     Zimbabwe    Africa  1977   57.674   6642107   685.587682\n",
              "1698     Zimbabwe    Africa  1982   60.363   7636524   788.855041\n",
              "1699     Zimbabwe    Africa  1987   62.351   9216418   706.157306\n",
              "1700     Zimbabwe    Africa  1992   60.377  10704340   693.420786\n",
              "1701     Zimbabwe    Africa  1997   46.809  11404948   792.449960\n",
              "1702     Zimbabwe    Africa  2002   39.989  11926563   672.038623\n",
              "1703     Zimbabwe    Africa  2007   43.487  12311143   469.709298\n",
              "\n",
              "[1704 rows x 6 columns]"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 5,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df = pandas.read_csv('../data/gapminder.tsv', sep='\\t')"
      ],
      "outputs": [],
      "execution_count": 7,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 8,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1952</td>\n",
              "      <td>28.801</td>\n",
              "      <td>8425333</td>\n",
              "      <td>779.445314</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1957</td>\n",
              "      <td>30.332</td>\n",
              "      <td>9240934</td>\n",
              "      <td>820.853030</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1962</td>\n",
              "      <td>31.997</td>\n",
              "      <td>10267083</td>\n",
              "      <td>853.100710</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1967</td>\n",
              "      <td>34.020</td>\n",
              "      <td>11537966</td>\n",
              "      <td>836.197138</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1972</td>\n",
              "      <td>36.088</td>\n",
              "      <td>13079460</td>\n",
              "      <td>739.981106</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1977</td>\n",
              "      <td>38.438</td>\n",
              "      <td>14880372</td>\n",
              "      <td>786.113360</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1982</td>\n",
              "      <td>39.854</td>\n",
              "      <td>12881816</td>\n",
              "      <td>978.011439</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1987</td>\n",
              "      <td>40.822</td>\n",
              "      <td>13867957</td>\n",
              "      <td>852.395945</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1992</td>\n",
              "      <td>41.674</td>\n",
              "      <td>16317921</td>\n",
              "      <td>649.341395</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1997</td>\n",
              "      <td>41.763</td>\n",
              "      <td>22227415</td>\n",
              "      <td>635.341351</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2002</td>\n",
              "      <td>42.129</td>\n",
              "      <td>25268405</td>\n",
              "      <td>726.734055</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2007</td>\n",
              "      <td>43.828</td>\n",
              "      <td>31889923</td>\n",
              "      <td>974.580338</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1952</td>\n",
              "      <td>55.230</td>\n",
              "      <td>1282697</td>\n",
              "      <td>1601.056136</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>13</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1957</td>\n",
              "      <td>59.280</td>\n",
              "      <td>1476505</td>\n",
              "      <td>1942.284244</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>14</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1962</td>\n",
              "      <td>64.820</td>\n",
              "      <td>1728137</td>\n",
              "      <td>2312.888958</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>15</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1967</td>\n",
              "      <td>66.220</td>\n",
              "      <td>1984060</td>\n",
              "      <td>2760.196931</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>16</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1972</td>\n",
              "      <td>67.690</td>\n",
              "      <td>2263554</td>\n",
              "      <td>3313.422188</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>17</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1977</td>\n",
              "      <td>68.930</td>\n",
              "      <td>2509048</td>\n",
              "      <td>3533.003910</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>18</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1982</td>\n",
              "      <td>70.420</td>\n",
              "      <td>2780097</td>\n",
              "      <td>3630.880722</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>19</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1987</td>\n",
              "      <td>72.000</td>\n",
              "      <td>3075321</td>\n",
              "      <td>3738.932735</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>20</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1992</td>\n",
              "      <td>71.581</td>\n",
              "      <td>3326498</td>\n",
              "      <td>2497.437901</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1997</td>\n",
              "      <td>72.950</td>\n",
              "      <td>3428038</td>\n",
              "      <td>3193.054604</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>22</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>2002</td>\n",
              "      <td>75.651</td>\n",
              "      <td>3508512</td>\n",
              "      <td>4604.211737</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>23</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>2007</td>\n",
              "      <td>76.423</td>\n",
              "      <td>3600523</td>\n",
              "      <td>5937.029526</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>24</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1952</td>\n",
              "      <td>43.077</td>\n",
              "      <td>9279525</td>\n",
              "      <td>2449.008185</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>25</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1957</td>\n",
              "      <td>45.685</td>\n",
              "      <td>10270856</td>\n",
              "      <td>3013.976023</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>26</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1962</td>\n",
              "      <td>48.303</td>\n",
              "      <td>11000948</td>\n",
              "      <td>2550.816880</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>27</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1967</td>\n",
              "      <td>51.407</td>\n",
              "      <td>12760499</td>\n",
              "      <td>3246.991771</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>28</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1972</td>\n",
              "      <td>54.518</td>\n",
              "      <td>14760787</td>\n",
              "      <td>4182.663766</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>29</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1977</td>\n",
              "      <td>58.014</td>\n",
              "      <td>17152804</td>\n",
              "      <td>4910.416756</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1674</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1982</td>\n",
              "      <td>49.113</td>\n",
              "      <td>9657618</td>\n",
              "      <td>1977.557010</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1675</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1987</td>\n",
              "      <td>52.922</td>\n",
              "      <td>11219340</td>\n",
              "      <td>1971.741538</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1676</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1992</td>\n",
              "      <td>55.599</td>\n",
              "      <td>13367997</td>\n",
              "      <td>1879.496673</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1677</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1997</td>\n",
              "      <td>58.020</td>\n",
              "      <td>15826497</td>\n",
              "      <td>2117.484526</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1678</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2002</td>\n",
              "      <td>60.308</td>\n",
              "      <td>18701257</td>\n",
              "      <td>2234.820827</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1679</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2007</td>\n",
              "      <td>62.698</td>\n",
              "      <td>22211743</td>\n",
              "      <td>2280.769906</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1680</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1952</td>\n",
              "      <td>42.038</td>\n",
              "      <td>2672000</td>\n",
              "      <td>1147.388831</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1681</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1957</td>\n",
              "      <td>44.077</td>\n",
              "      <td>3016000</td>\n",
              "      <td>1311.956766</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1682</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1962</td>\n",
              "      <td>46.023</td>\n",
              "      <td>3421000</td>\n",
              "      <td>1452.725766</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1683</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1967</td>\n",
              "      <td>47.768</td>\n",
              "      <td>3900000</td>\n",
              "      <td>1777.077318</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1684</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1972</td>\n",
              "      <td>50.107</td>\n",
              "      <td>4506497</td>\n",
              "      <td>1773.498265</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1685</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1977</td>\n",
              "      <td>51.386</td>\n",
              "      <td>5216550</td>\n",
              "      <td>1588.688299</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1686</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1982</td>\n",
              "      <td>51.821</td>\n",
              "      <td>6100407</td>\n",
              "      <td>1408.678565</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1687</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1987</td>\n",
              "      <td>50.821</td>\n",
              "      <td>7272406</td>\n",
              "      <td>1213.315116</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1688</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1992</td>\n",
              "      <td>46.100</td>\n",
              "      <td>8381163</td>\n",
              "      <td>1210.884633</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1689</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1997</td>\n",
              "      <td>40.238</td>\n",
              "      <td>9417789</td>\n",
              "      <td>1071.353818</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1690</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2002</td>\n",
              "      <td>39.193</td>\n",
              "      <td>10595811</td>\n",
              "      <td>1071.613938</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1691</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2007</td>\n",
              "      <td>42.384</td>\n",
              "      <td>11746035</td>\n",
              "      <td>1271.211593</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1692</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1952</td>\n",
              "      <td>48.451</td>\n",
              "      <td>3080907</td>\n",
              "      <td>406.884115</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1693</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1957</td>\n",
              "      <td>50.469</td>\n",
              "      <td>3646340</td>\n",
              "      <td>518.764268</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1694</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1962</td>\n",
              "      <td>52.358</td>\n",
              "      <td>4277736</td>\n",
              "      <td>527.272182</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1695</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1967</td>\n",
              "      <td>53.995</td>\n",
              "      <td>4995432</td>\n",
              "      <td>569.795071</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1696</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1972</td>\n",
              "      <td>55.635</td>\n",
              "      <td>5861135</td>\n",
              "      <td>799.362176</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1697</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1977</td>\n",
              "      <td>57.674</td>\n",
              "      <td>6642107</td>\n",
              "      <td>685.587682</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1698</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1982</td>\n",
              "      <td>60.363</td>\n",
              "      <td>7636524</td>\n",
              "      <td>788.855041</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1699</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1987</td>\n",
              "      <td>62.351</td>\n",
              "      <td>9216418</td>\n",
              "      <td>706.157306</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1700</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1992</td>\n",
              "      <td>60.377</td>\n",
              "      <td>10704340</td>\n",
              "      <td>693.420786</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1701</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1997</td>\n",
              "      <td>46.809</td>\n",
              "      <td>11404948</td>\n",
              "      <td>792.449960</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1702</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2002</td>\n",
              "      <td>39.989</td>\n",
              "      <td>11926563</td>\n",
              "      <td>672.038623</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1703</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2007</td>\n",
              "      <td>43.487</td>\n",
              "      <td>12311143</td>\n",
              "      <td>469.709298</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>1704 rows × 6 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "          country continent  year  lifeExp       pop    gdpPercap\n",
              "0     Afghanistan      Asia  1952   28.801   8425333   779.445314\n",
              "1     Afghanistan      Asia  1957   30.332   9240934   820.853030\n",
              "2     Afghanistan      Asia  1962   31.997  10267083   853.100710\n",
              "3     Afghanistan      Asia  1967   34.020  11537966   836.197138\n",
              "4     Afghanistan      Asia  1972   36.088  13079460   739.981106\n",
              "5     Afghanistan      Asia  1977   38.438  14880372   786.113360\n",
              "6     Afghanistan      Asia  1982   39.854  12881816   978.011439\n",
              "7     Afghanistan      Asia  1987   40.822  13867957   852.395945\n",
              "8     Afghanistan      Asia  1992   41.674  16317921   649.341395\n",
              "9     Afghanistan      Asia  1997   41.763  22227415   635.341351\n",
              "10    Afghanistan      Asia  2002   42.129  25268405   726.734055\n",
              "11    Afghanistan      Asia  2007   43.828  31889923   974.580338\n",
              "12        Albania    Europe  1952   55.230   1282697  1601.056136\n",
              "13        Albania    Europe  1957   59.280   1476505  1942.284244\n",
              "14        Albania    Europe  1962   64.820   1728137  2312.888958\n",
              "15        Albania    Europe  1967   66.220   1984060  2760.196931\n",
              "16        Albania    Europe  1972   67.690   2263554  3313.422188\n",
              "17        Albania    Europe  1977   68.930   2509048  3533.003910\n",
              "18        Albania    Europe  1982   70.420   2780097  3630.880722\n",
              "19        Albania    Europe  1987   72.000   3075321  3738.932735\n",
              "20        Albania    Europe  1992   71.581   3326498  2497.437901\n",
              "21        Albania    Europe  1997   72.950   3428038  3193.054604\n",
              "22        Albania    Europe  2002   75.651   3508512  4604.211737\n",
              "23        Albania    Europe  2007   76.423   3600523  5937.029526\n",
              "24        Algeria    Africa  1952   43.077   9279525  2449.008185\n",
              "25        Algeria    Africa  1957   45.685  10270856  3013.976023\n",
              "26        Algeria    Africa  1962   48.303  11000948  2550.816880\n",
              "27        Algeria    Africa  1967   51.407  12760499  3246.991771\n",
              "28        Algeria    Africa  1972   54.518  14760787  4182.663766\n",
              "29        Algeria    Africa  1977   58.014  17152804  4910.416756\n",
              "...           ...       ...   ...      ...       ...          ...\n",
              "1674  Yemen, Rep.      Asia  1982   49.113   9657618  1977.557010\n",
              "1675  Yemen, Rep.      Asia  1987   52.922  11219340  1971.741538\n",
              "1676  Yemen, Rep.      Asia  1992   55.599  13367997  1879.496673\n",
              "1677  Yemen, Rep.      Asia  1997   58.020  15826497  2117.484526\n",
              "1678  Yemen, Rep.      Asia  2002   60.308  18701257  2234.820827\n",
              "1679  Yemen, Rep.      Asia  2007   62.698  22211743  2280.769906\n",
              "1680       Zambia    Africa  1952   42.038   2672000  1147.388831\n",
              "1681       Zambia    Africa  1957   44.077   3016000  1311.956766\n",
              "1682       Zambia    Africa  1962   46.023   3421000  1452.725766\n",
              "1683       Zambia    Africa  1967   47.768   3900000  1777.077318\n",
              "1684       Zambia    Africa  1972   50.107   4506497  1773.498265\n",
              "1685       Zambia    Africa  1977   51.386   5216550  1588.688299\n",
              "1686       Zambia    Africa  1982   51.821   6100407  1408.678565\n",
              "1687       Zambia    Africa  1987   50.821   7272406  1213.315116\n",
              "1688       Zambia    Africa  1992   46.100   8381163  1210.884633\n",
              "1689       Zambia    Africa  1997   40.238   9417789  1071.353818\n",
              "1690       Zambia    Africa  2002   39.193  10595811  1071.613938\n",
              "1691       Zambia    Africa  2007   42.384  11746035  1271.211593\n",
              "1692     Zimbabwe    Africa  1952   48.451   3080907   406.884115\n",
              "1693     Zimbabwe    Africa  1957   50.469   3646340   518.764268\n",
              "1694     Zimbabwe    Africa  1962   52.358   4277736   527.272182\n",
              "1695     Zimbabwe    Africa  1967   53.995   4995432   569.795071\n",
              "1696     Zimbabwe    Africa  1972   55.635   5861135   799.362176\n",
              "1697     Zimbabwe    Africa  1977   57.674   6642107   685.587682\n",
              "1698     Zimbabwe    Africa  1982   60.363   7636524   788.855041\n",
              "1699     Zimbabwe    Africa  1987   62.351   9216418   706.157306\n",
              "1700     Zimbabwe    Africa  1992   60.377  10704340   693.420786\n",
              "1701     Zimbabwe    Africa  1997   46.809  11404948   792.449960\n",
              "1702     Zimbabwe    Africa  2002   39.989  11926563   672.038623\n",
              "1703     Zimbabwe    Africa  2007   43.487  12311143   469.709298\n",
              "\n",
              "[1704 rows x 6 columns]"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 8,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "import pandas as pd"
      ],
      "outputs": [],
      "execution_count": 9,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "# from pandas import * ## Do not do this"
      ],
      "outputs": [],
      "execution_count": 10,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df = pd.read_csv('../data/gapminder.tsv', sep='\\t')"
      ],
      "outputs": [],
      "execution_count": 11,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 12,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1952</td>\n",
              "      <td>28.801</td>\n",
              "      <td>8425333</td>\n",
              "      <td>779.445314</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1957</td>\n",
              "      <td>30.332</td>\n",
              "      <td>9240934</td>\n",
              "      <td>820.853030</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1962</td>\n",
              "      <td>31.997</td>\n",
              "      <td>10267083</td>\n",
              "      <td>853.100710</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1967</td>\n",
              "      <td>34.020</td>\n",
              "      <td>11537966</td>\n",
              "      <td>836.197138</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1972</td>\n",
              "      <td>36.088</td>\n",
              "      <td>13079460</td>\n",
              "      <td>739.981106</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1977</td>\n",
              "      <td>38.438</td>\n",
              "      <td>14880372</td>\n",
              "      <td>786.113360</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1982</td>\n",
              "      <td>39.854</td>\n",
              "      <td>12881816</td>\n",
              "      <td>978.011439</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1987</td>\n",
              "      <td>40.822</td>\n",
              "      <td>13867957</td>\n",
              "      <td>852.395945</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1992</td>\n",
              "      <td>41.674</td>\n",
              "      <td>16317921</td>\n",
              "      <td>649.341395</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1997</td>\n",
              "      <td>41.763</td>\n",
              "      <td>22227415</td>\n",
              "      <td>635.341351</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2002</td>\n",
              "      <td>42.129</td>\n",
              "      <td>25268405</td>\n",
              "      <td>726.734055</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2007</td>\n",
              "      <td>43.828</td>\n",
              "      <td>31889923</td>\n",
              "      <td>974.580338</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1952</td>\n",
              "      <td>55.230</td>\n",
              "      <td>1282697</td>\n",
              "      <td>1601.056136</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>13</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1957</td>\n",
              "      <td>59.280</td>\n",
              "      <td>1476505</td>\n",
              "      <td>1942.284244</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>14</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1962</td>\n",
              "      <td>64.820</td>\n",
              "      <td>1728137</td>\n",
              "      <td>2312.888958</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>15</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1967</td>\n",
              "      <td>66.220</td>\n",
              "      <td>1984060</td>\n",
              "      <td>2760.196931</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>16</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1972</td>\n",
              "      <td>67.690</td>\n",
              "      <td>2263554</td>\n",
              "      <td>3313.422188</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>17</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1977</td>\n",
              "      <td>68.930</td>\n",
              "      <td>2509048</td>\n",
              "      <td>3533.003910</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>18</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1982</td>\n",
              "      <td>70.420</td>\n",
              "      <td>2780097</td>\n",
              "      <td>3630.880722</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>19</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1987</td>\n",
              "      <td>72.000</td>\n",
              "      <td>3075321</td>\n",
              "      <td>3738.932735</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>20</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1992</td>\n",
              "      <td>71.581</td>\n",
              "      <td>3326498</td>\n",
              "      <td>2497.437901</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>1997</td>\n",
              "      <td>72.950</td>\n",
              "      <td>3428038</td>\n",
              "      <td>3193.054604</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>22</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>2002</td>\n",
              "      <td>75.651</td>\n",
              "      <td>3508512</td>\n",
              "      <td>4604.211737</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>23</th>\n",
              "      <td>Albania</td>\n",
              "      <td>Europe</td>\n",
              "      <td>2007</td>\n",
              "      <td>76.423</td>\n",
              "      <td>3600523</td>\n",
              "      <td>5937.029526</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>24</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1952</td>\n",
              "      <td>43.077</td>\n",
              "      <td>9279525</td>\n",
              "      <td>2449.008185</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>25</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1957</td>\n",
              "      <td>45.685</td>\n",
              "      <td>10270856</td>\n",
              "      <td>3013.976023</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>26</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1962</td>\n",
              "      <td>48.303</td>\n",
              "      <td>11000948</td>\n",
              "      <td>2550.816880</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>27</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1967</td>\n",
              "      <td>51.407</td>\n",
              "      <td>12760499</td>\n",
              "      <td>3246.991771</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>28</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1972</td>\n",
              "      <td>54.518</td>\n",
              "      <td>14760787</td>\n",
              "      <td>4182.663766</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>29</th>\n",
              "      <td>Algeria</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1977</td>\n",
              "      <td>58.014</td>\n",
              "      <td>17152804</td>\n",
              "      <td>4910.416756</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1674</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1982</td>\n",
              "      <td>49.113</td>\n",
              "      <td>9657618</td>\n",
              "      <td>1977.557010</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1675</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1987</td>\n",
              "      <td>52.922</td>\n",
              "      <td>11219340</td>\n",
              "      <td>1971.741538</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1676</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1992</td>\n",
              "      <td>55.599</td>\n",
              "      <td>13367997</td>\n",
              "      <td>1879.496673</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1677</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1997</td>\n",
              "      <td>58.020</td>\n",
              "      <td>15826497</td>\n",
              "      <td>2117.484526</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1678</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2002</td>\n",
              "      <td>60.308</td>\n",
              "      <td>18701257</td>\n",
              "      <td>2234.820827</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1679</th>\n",
              "      <td>Yemen, Rep.</td>\n",
              "      <td>Asia</td>\n",
              "      <td>2007</td>\n",
              "      <td>62.698</td>\n",
              "      <td>22211743</td>\n",
              "      <td>2280.769906</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1680</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1952</td>\n",
              "      <td>42.038</td>\n",
              "      <td>2672000</td>\n",
              "      <td>1147.388831</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1681</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1957</td>\n",
              "      <td>44.077</td>\n",
              "      <td>3016000</td>\n",
              "      <td>1311.956766</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1682</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1962</td>\n",
              "      <td>46.023</td>\n",
              "      <td>3421000</td>\n",
              "      <td>1452.725766</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1683</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1967</td>\n",
              "      <td>47.768</td>\n",
              "      <td>3900000</td>\n",
              "      <td>1777.077318</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1684</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1972</td>\n",
              "      <td>50.107</td>\n",
              "      <td>4506497</td>\n",
              "      <td>1773.498265</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1685</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1977</td>\n",
              "      <td>51.386</td>\n",
              "      <td>5216550</td>\n",
              "      <td>1588.688299</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1686</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1982</td>\n",
              "      <td>51.821</td>\n",
              "      <td>6100407</td>\n",
              "      <td>1408.678565</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1687</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1987</td>\n",
              "      <td>50.821</td>\n",
              "      <td>7272406</td>\n",
              "      <td>1213.315116</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1688</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1992</td>\n",
              "      <td>46.100</td>\n",
              "      <td>8381163</td>\n",
              "      <td>1210.884633</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1689</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1997</td>\n",
              "      <td>40.238</td>\n",
              "      <td>9417789</td>\n",
              "      <td>1071.353818</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1690</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2002</td>\n",
              "      <td>39.193</td>\n",
              "      <td>10595811</td>\n",
              "      <td>1071.613938</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1691</th>\n",
              "      <td>Zambia</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2007</td>\n",
              "      <td>42.384</td>\n",
              "      <td>11746035</td>\n",
              "      <td>1271.211593</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1692</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1952</td>\n",
              "      <td>48.451</td>\n",
              "      <td>3080907</td>\n",
              "      <td>406.884115</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1693</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1957</td>\n",
              "      <td>50.469</td>\n",
              "      <td>3646340</td>\n",
              "      <td>518.764268</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1694</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1962</td>\n",
              "      <td>52.358</td>\n",
              "      <td>4277736</td>\n",
              "      <td>527.272182</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1695</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1967</td>\n",
              "      <td>53.995</td>\n",
              "      <td>4995432</td>\n",
              "      <td>569.795071</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1696</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1972</td>\n",
              "      <td>55.635</td>\n",
              "      <td>5861135</td>\n",
              "      <td>799.362176</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1697</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1977</td>\n",
              "      <td>57.674</td>\n",
              "      <td>6642107</td>\n",
              "      <td>685.587682</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1698</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1982</td>\n",
              "      <td>60.363</td>\n",
              "      <td>7636524</td>\n",
              "      <td>788.855041</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1699</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1987</td>\n",
              "      <td>62.351</td>\n",
              "      <td>9216418</td>\n",
              "      <td>706.157306</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1700</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1992</td>\n",
              "      <td>60.377</td>\n",
              "      <td>10704340</td>\n",
              "      <td>693.420786</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1701</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1997</td>\n",
              "      <td>46.809</td>\n",
              "      <td>11404948</td>\n",
              "      <td>792.449960</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1702</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2002</td>\n",
              "      <td>39.989</td>\n",
              "      <td>11926563</td>\n",
              "      <td>672.038623</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1703</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2007</td>\n",
              "      <td>43.487</td>\n",
              "      <td>12311143</td>\n",
              "      <td>469.709298</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>1704 rows × 6 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "          country continent  year  lifeExp       pop    gdpPercap\n",
              "0     Afghanistan      Asia  1952   28.801   8425333   779.445314\n",
              "1     Afghanistan      Asia  1957   30.332   9240934   820.853030\n",
              "2     Afghanistan      Asia  1962   31.997  10267083   853.100710\n",
              "3     Afghanistan      Asia  1967   34.020  11537966   836.197138\n",
              "4     Afghanistan      Asia  1972   36.088  13079460   739.981106\n",
              "5     Afghanistan      Asia  1977   38.438  14880372   786.113360\n",
              "6     Afghanistan      Asia  1982   39.854  12881816   978.011439\n",
              "7     Afghanistan      Asia  1987   40.822  13867957   852.395945\n",
              "8     Afghanistan      Asia  1992   41.674  16317921   649.341395\n",
              "9     Afghanistan      Asia  1997   41.763  22227415   635.341351\n",
              "10    Afghanistan      Asia  2002   42.129  25268405   726.734055\n",
              "11    Afghanistan      Asia  2007   43.828  31889923   974.580338\n",
              "12        Albania    Europe  1952   55.230   1282697  1601.056136\n",
              "13        Albania    Europe  1957   59.280   1476505  1942.284244\n",
              "14        Albania    Europe  1962   64.820   1728137  2312.888958\n",
              "15        Albania    Europe  1967   66.220   1984060  2760.196931\n",
              "16        Albania    Europe  1972   67.690   2263554  3313.422188\n",
              "17        Albania    Europe  1977   68.930   2509048  3533.003910\n",
              "18        Albania    Europe  1982   70.420   2780097  3630.880722\n",
              "19        Albania    Europe  1987   72.000   3075321  3738.932735\n",
              "20        Albania    Europe  1992   71.581   3326498  2497.437901\n",
              "21        Albania    Europe  1997   72.950   3428038  3193.054604\n",
              "22        Albania    Europe  2002   75.651   3508512  4604.211737\n",
              "23        Albania    Europe  2007   76.423   3600523  5937.029526\n",
              "24        Algeria    Africa  1952   43.077   9279525  2449.008185\n",
              "25        Algeria    Africa  1957   45.685  10270856  3013.976023\n",
              "26        Algeria    Africa  1962   48.303  11000948  2550.816880\n",
              "27        Algeria    Africa  1967   51.407  12760499  3246.991771\n",
              "28        Algeria    Africa  1972   54.518  14760787  4182.663766\n",
              "29        Algeria    Africa  1977   58.014  17152804  4910.416756\n",
              "...           ...       ...   ...      ...       ...          ...\n",
              "1674  Yemen, Rep.      Asia  1982   49.113   9657618  1977.557010\n",
              "1675  Yemen, Rep.      Asia  1987   52.922  11219340  1971.741538\n",
              "1676  Yemen, Rep.      Asia  1992   55.599  13367997  1879.496673\n",
              "1677  Yemen, Rep.      Asia  1997   58.020  15826497  2117.484526\n",
              "1678  Yemen, Rep.      Asia  2002   60.308  18701257  2234.820827\n",
              "1679  Yemen, Rep.      Asia  2007   62.698  22211743  2280.769906\n",
              "1680       Zambia    Africa  1952   42.038   2672000  1147.388831\n",
              "1681       Zambia    Africa  1957   44.077   3016000  1311.956766\n",
              "1682       Zambia    Africa  1962   46.023   3421000  1452.725766\n",
              "1683       Zambia    Africa  1967   47.768   3900000  1777.077318\n",
              "1684       Zambia    Africa  1972   50.107   4506497  1773.498265\n",
              "1685       Zambia    Africa  1977   51.386   5216550  1588.688299\n",
              "1686       Zambia    Africa  1982   51.821   6100407  1408.678565\n",
              "1687       Zambia    Africa  1987   50.821   7272406  1213.315116\n",
              "1688       Zambia    Africa  1992   46.100   8381163  1210.884633\n",
              "1689       Zambia    Africa  1997   40.238   9417789  1071.353818\n",
              "1690       Zambia    Africa  2002   39.193  10595811  1071.613938\n",
              "1691       Zambia    Africa  2007   42.384  11746035  1271.211593\n",
              "1692     Zimbabwe    Africa  1952   48.451   3080907   406.884115\n",
              "1693     Zimbabwe    Africa  1957   50.469   3646340   518.764268\n",
              "1694     Zimbabwe    Africa  1962   52.358   4277736   527.272182\n",
              "1695     Zimbabwe    Africa  1967   53.995   4995432   569.795071\n",
              "1696     Zimbabwe    Africa  1972   55.635   5861135   799.362176\n",
              "1697     Zimbabwe    Africa  1977   57.674   6642107   685.587682\n",
              "1698     Zimbabwe    Africa  1982   60.363   7636524   788.855041\n",
              "1699     Zimbabwe    Africa  1987   62.351   9216418   706.157306\n",
              "1700     Zimbabwe    Africa  1992   60.377  10704340   693.420786\n",
              "1701     Zimbabwe    Africa  1997   46.809  11404948   792.449960\n",
              "1702     Zimbabwe    Africa  2002   39.989  11926563   672.038623\n",
              "1703     Zimbabwe    Africa  2007   43.487  12311143   469.709298\n",
              "\n",
              "[1704 rows x 6 columns]"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 12,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "type(df)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 13,
          "data": {
            "text/plain": [
              "pandas.core.frame.DataFrame"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 13,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.shape"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 14,
          "data": {
            "text/plain": [
              "(1704, 6)"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 14,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.info()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "<class 'pandas.core.frame.DataFrame'>\n",
            "RangeIndex: 1704 entries, 0 to 1703\n",
            "Data columns (total 6 columns):\n",
            "country      1704 non-null object\n",
            "continent    1704 non-null object\n",
            "year         1704 non-null int64\n",
            "lifeExp      1704 non-null float64\n",
            "pop          1704 non-null int64\n",
            "gdpPercap    1704 non-null float64\n",
            "dtypes: float64(2), int64(2), object(2)\n",
            "memory usage: 80.0+ KB\n"
          ]
        }
      ],
      "execution_count": 15,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.shape()"
      ],
      "outputs": [
        {
          "output_type": "error",
          "ename": "TypeError",
          "evalue": "'tuple' object is not callable",
          "traceback": [
            "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
            "\u001b[1;32m<ipython-input-16-0e566b70f572>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
            "\u001b[1;31mTypeError\u001b[0m: 'tuple' object is not callable"
          ]
        }
      ],
      "execution_count": 16,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 17,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1952</td>\n",
              "      <td>28.801</td>\n",
              "      <td>8425333</td>\n",
              "      <td>779.445314</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1957</td>\n",
              "      <td>30.332</td>\n",
              "      <td>9240934</td>\n",
              "      <td>820.853030</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1962</td>\n",
              "      <td>31.997</td>\n",
              "      <td>10267083</td>\n",
              "      <td>853.100710</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1967</td>\n",
              "      <td>34.020</td>\n",
              "      <td>11537966</td>\n",
              "      <td>836.197138</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1972</td>\n",
              "      <td>36.088</td>\n",
              "      <td>13079460</td>\n",
              "      <td>739.981106</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "       country continent  year  lifeExp       pop   gdpPercap\n",
              "0  Afghanistan      Asia  1952   28.801   8425333  779.445314\n",
              "1  Afghanistan      Asia  1957   30.332   9240934  820.853030\n",
              "2  Afghanistan      Asia  1962   31.997  10267083  853.100710\n",
              "3  Afghanistan      Asia  1967   34.020  11537966  836.197138\n",
              "4  Afghanistan      Asia  1972   36.088  13079460  739.981106"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 17,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.tail()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 18,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1699</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1987</td>\n",
              "      <td>62.351</td>\n",
              "      <td>9216418</td>\n",
              "      <td>706.157306</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1700</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1992</td>\n",
              "      <td>60.377</td>\n",
              "      <td>10704340</td>\n",
              "      <td>693.420786</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1701</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>1997</td>\n",
              "      <td>46.809</td>\n",
              "      <td>11404948</td>\n",
              "      <td>792.449960</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1702</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2002</td>\n",
              "      <td>39.989</td>\n",
              "      <td>11926563</td>\n",
              "      <td>672.038623</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1703</th>\n",
              "      <td>Zimbabwe</td>\n",
              "      <td>Africa</td>\n",
              "      <td>2007</td>\n",
              "      <td>43.487</td>\n",
              "      <td>12311143</td>\n",
              "      <td>469.709298</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "       country continent  year  lifeExp       pop   gdpPercap\n",
              "1699  Zimbabwe    Africa  1987   62.351   9216418  706.157306\n",
              "1700  Zimbabwe    Africa  1992   60.377  10704340  693.420786\n",
              "1701  Zimbabwe    Africa  1997   46.809  11404948  792.449960\n",
              "1702  Zimbabwe    Africa  2002   39.989  11926563  672.038623\n",
              "1703  Zimbabwe    Africa  2007   43.487  12311143  469.709298"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 18,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.columns"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 19,
          "data": {
            "text/plain": [
              "Index(['country', 'continent', 'year', 'lifeExp', 'pop', 'gdpPercap'], dtype='object')"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 19,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.index"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 20,
          "data": {
            "text/plain": [
              "RangeIndex(start=0, stop=1704, step=1)"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 20,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.values"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 21,
          "data": {
            "text/plain": [
              "array([['Afghanistan', 'Asia', 1952, 28.801, 8425333, 779.4453145],\n",
              "       ['Afghanistan', 'Asia', 1957, 30.331999999999997, 9240934,\n",
              "        820.8530296],\n",
              "       ['Afghanistan', 'Asia', 1962, 31.997, 10267083, 853.1007099999999],\n",
              "       ...,\n",
              "       ['Zimbabwe', 'Africa', 1997, 46.809, 11404948, 792.4499602999999],\n",
              "       ['Zimbabwe', 'Africa', 2002, 39.989000000000004, 11926563,\n",
              "        672.0386227000001],\n",
              "       ['Zimbabwe', 'Africa', 2007, 43.486999999999995, 12311143,\n",
              "        469.70929810000007]], dtype=object)"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 21,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.dtypes"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 22,
          "data": {
            "text/plain": [
              "country       object\n",
              "continent     object\n",
              "year           int64\n",
              "lifeExp      float64\n",
              "pop            int64\n",
              "gdpPercap    float64\n",
              "dtype: object"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 22,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "country = df['country']"
      ],
      "outputs": [],
      "execution_count": 24,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "type(country)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 25,
          "data": {
            "text/plain": [
              "pandas.core.series.Series"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 25,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "country = df[['country']]"
      ],
      "outputs": [],
      "execution_count": 26,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "type(country)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 28,
          "data": {
            "text/plain": [
              "pandas.core.frame.DataFrame"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 28,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 29,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1952</td>\n",
              "      <td>28.801</td>\n",
              "      <td>8425333</td>\n",
              "      <td>779.445314</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1957</td>\n",
              "      <td>30.332</td>\n",
              "      <td>9240934</td>\n",
              "      <td>820.853030</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1962</td>\n",
              "      <td>31.997</td>\n",
              "      <td>10267083</td>\n",
              "      <td>853.100710</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1967</td>\n",
              "      <td>34.020</td>\n",
              "      <td>11537966</td>\n",
              "      <td>836.197138</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1972</td>\n",
              "      <td>36.088</td>\n",
              "      <td>13079460</td>\n",
              "      <td>739.981106</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "       country continent  year  lifeExp       pop   gdpPercap\n",
              "0  Afghanistan      Asia  1952   28.801   8425333  779.445314\n",
              "1  Afghanistan      Asia  1957   30.332   9240934  820.853030\n",
              "2  Afghanistan      Asia  1962   31.997  10267083  853.100710\n",
              "3  Afghanistan      Asia  1967   34.020  11537966  836.197138\n",
              "4  Afghanistan      Asia  1972   36.088  13079460  739.981106"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 29,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "del df['country']"
      ],
      "outputs": [],
      "execution_count": 30,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 31,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Asia</td>\n",
              "      <td>1952</td>\n",
              "      <td>28.801</td>\n",
              "      <td>8425333</td>\n",
              "      <td>779.445314</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Asia</td>\n",
              "      <td>1957</td>\n",
              "      <td>30.332</td>\n",
              "      <td>9240934</td>\n",
              "      <td>820.853030</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Asia</td>\n",
              "      <td>1962</td>\n",
              "      <td>31.997</td>\n",
              "      <td>10267083</td>\n",
              "      <td>853.100710</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Asia</td>\n",
              "      <td>1967</td>\n",
              "      <td>34.020</td>\n",
              "      <td>11537966</td>\n",
              "      <td>836.197138</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Asia</td>\n",
              "      <td>1972</td>\n",
              "      <td>36.088</td>\n",
              "      <td>13079460</td>\n",
              "      <td>739.981106</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "  continent  year  lifeExp       pop   gdpPercap\n",
              "0      Asia  1952   28.801   8425333  779.445314\n",
              "1      Asia  1957   30.332   9240934  820.853030\n",
              "2      Asia  1962   31.997  10267083  853.100710\n",
              "3      Asia  1967   34.020  11537966  836.197138\n",
              "4      Asia  1972   36.088  13079460  739.981106"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 31,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df = pd.read_csv('../data/gapminder.tsv', sep='\\t')"
      ],
      "outputs": [],
      "execution_count": 36,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df = df.drop(['continent', 'country'], axis='columns')"
      ],
      "outputs": [],
      "execution_count": 41,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df = pd.read_csv('../data/gapminder.tsv', sep='\\t')"
      ],
      "outputs": [],
      "execution_count": 42,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 45,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1952</td>\n",
              "      <td>28.801</td>\n",
              "      <td>8425333</td>\n",
              "      <td>779.445314</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1957</td>\n",
              "      <td>30.332</td>\n",
              "      <td>9240934</td>\n",
              "      <td>820.853030</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1962</td>\n",
              "      <td>31.997</td>\n",
              "      <td>10267083</td>\n",
              "      <td>853.100710</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1967</td>\n",
              "      <td>34.020</td>\n",
              "      <td>11537966</td>\n",
              "      <td>836.197138</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1972</td>\n",
              "      <td>36.088</td>\n",
              "      <td>13079460</td>\n",
              "      <td>739.981106</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "       country continent  year  lifeExp       pop   gdpPercap\n",
              "0  Afghanistan      Asia  1952   28.801   8425333  779.445314\n",
              "1  Afghanistan      Asia  1957   30.332   9240934  820.853030\n",
              "2  Afghanistan      Asia  1962   31.997  10267083  853.100710\n",
              "3  Afghanistan      Asia  1967   34.020  11537966  836.197138\n",
              "4  Afghanistan      Asia  1972   36.088  13079460  739.981106"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 45,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.loc[0]"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 48,
          "data": {
            "text/plain": [
              "country      Afghanistan\n",
              "continent           Asia\n",
              "year                1952\n",
              "lifeExp           28.801\n",
              "pop              8425333\n",
              "gdpPercap        779.445\n",
              "Name: 0, dtype: object"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 48,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.loc[-1]"
      ],
      "outputs": [
        {
          "output_type": "error",
          "ename": "KeyError",
          "evalue": "-1",
          "traceback": [
            "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[1;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexes\\base.py\u001b[0m in \u001b[0;36mget_loc\u001b[1;34m(self, key, method, tolerance)\u001b[0m\n\u001b[0;32m   2656\u001b[0m             \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2657\u001b[1;33m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   2658\u001b[0m             \u001b[1;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
            "\u001b[1;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
            "\u001b[1;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.Int64HashTable.get_item\u001b[1;34m()\u001b[0m\n",
            "\u001b[1;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.Int64HashTable.get_item\u001b[1;34m()\u001b[0m\n",
            "\u001b[1;31mKeyError\u001b[0m: -1",
            "\nDuring handling of the above exception, another exception occurred:\n",
            "\u001b[1;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
            "\u001b[1;32m<ipython-input-46-c8e3ddd1947a>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m__getitem__\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m   1498\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1499\u001b[0m             \u001b[0mmaybe_callable\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcom\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mapply_if_callable\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1500\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_axis\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmaybe_callable\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1501\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1502\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_is_scalar_access\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_getitem_axis\u001b[1;34m(self, key, axis)\u001b[0m\n\u001b[0;32m   1911\u001b[0m         \u001b[1;31m# fall thru to straight lookup\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1912\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_validate_key\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1913\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_get_label\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1914\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1915\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_get_label\u001b[1;34m(self, label, axis)\u001b[0m\n\u001b[0;32m    139\u001b[0m             \u001b[1;32mraise\u001b[0m \u001b[0mIndexingError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'no slices here, handle elsewhere'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    140\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 141\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_xs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    142\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    143\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_get_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36mxs\u001b[1;34m(self, key, axis, level, drop_level)\u001b[0m\n\u001b[0;32m   3583\u001b[0m                                                       drop_level=drop_level)\n\u001b[0;32m   3584\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 3585\u001b[1;33m             \u001b[0mloc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   3586\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   3587\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mndarray\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexes\\base.py\u001b[0m in \u001b[0;36mget_loc\u001b[1;34m(self, key, method, tolerance)\u001b[0m\n\u001b[0;32m   2657\u001b[0m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2658\u001b[0m             \u001b[1;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2659\u001b[1;33m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_maybe_cast_indexer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   2660\u001b[0m         \u001b[0mindexer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_indexer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmethod\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtolerance\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mtolerance\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2661\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mindexer\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mndim\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m1\u001b[0m \u001b[1;32mor\u001b[0m \u001b[0mindexer\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msize\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
            "\u001b[1;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
            "\u001b[1;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.Int64HashTable.get_item\u001b[1;34m()\u001b[0m\n",
            "\u001b[1;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.Int64HashTable.get_item\u001b[1;34m()\u001b[0m\n",
            "\u001b[1;31mKeyError\u001b[0m: -1"
          ]
        }
      ],
      "execution_count": 46,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.loc[[0, 1]]"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 49,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1952</td>\n",
              "      <td>28.801</td>\n",
              "      <td>8425333</td>\n",
              "      <td>779.445314</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1957</td>\n",
              "      <td>30.332</td>\n",
              "      <td>9240934</td>\n",
              "      <td>820.853030</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "       country continent  year  lifeExp      pop   gdpPercap\n",
              "0  Afghanistan      Asia  1952   28.801  8425333  779.445314\n",
              "1  Afghanistan      Asia  1957   30.332  9240934  820.853030"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 49,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.iloc[0]"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 50,
          "data": {
            "text/plain": [
              "country      Afghanistan\n",
              "continent           Asia\n",
              "year                1952\n",
              "lifeExp           28.801\n",
              "pop              8425333\n",
              "gdpPercap        779.445\n",
              "Name: 0, dtype: object"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 50,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.iloc[-1]"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 51,
          "data": {
            "text/plain": [
              "country      Zimbabwe\n",
              "continent      Africa\n",
              "year             2007\n",
              "lifeExp        43.487\n",
              "pop          12311143\n",
              "gdpPercap     469.709\n",
              "Name: 1703, dtype: object"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 51,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "subset = df.loc[:, ['year', 'pop']]"
      ],
      "outputs": [],
      "execution_count": 52,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "subset.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 53,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>year</th>\n",
              "      <th>pop</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>1952</td>\n",
              "      <td>8425333</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1957</td>\n",
              "      <td>9240934</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1962</td>\n",
              "      <td>10267083</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1967</td>\n",
              "      <td>11537966</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1972</td>\n",
              "      <td>13079460</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   year       pop\n",
              "0  1952   8425333\n",
              "1  1957   9240934\n",
              "2  1962  10267083\n",
              "3  1967  11537966\n",
              "4  1972  13079460"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 53,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "subset = df.iloc[:, [2, 4]]"
      ],
      "outputs": [],
      "execution_count": 55,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "subset.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 57,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>year</th>\n",
              "      <th>pop</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>1952</td>\n",
              "      <td>8425333</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1957</td>\n",
              "      <td>9240934</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1962</td>\n",
              "      <td>10267083</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1967</td>\n",
              "      <td>11537966</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1972</td>\n",
              "      <td>13079460</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   year       pop\n",
              "0  1952   8425333\n",
              "1  1957   9240934\n",
              "2  1962  10267083\n",
              "3  1967  11537966\n",
              "4  1972  13079460"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 57,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.loc[df['country'] == 'United States']"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 58,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1608</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1952</td>\n",
              "      <td>68.440</td>\n",
              "      <td>157553000</td>\n",
              "      <td>13990.48208</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1609</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1957</td>\n",
              "      <td>69.490</td>\n",
              "      <td>171984000</td>\n",
              "      <td>14847.12712</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1610</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1962</td>\n",
              "      <td>70.210</td>\n",
              "      <td>186538000</td>\n",
              "      <td>16173.14586</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1611</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1967</td>\n",
              "      <td>70.760</td>\n",
              "      <td>198712000</td>\n",
              "      <td>19530.36557</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1612</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1972</td>\n",
              "      <td>71.340</td>\n",
              "      <td>209896000</td>\n",
              "      <td>21806.03594</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1613</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1977</td>\n",
              "      <td>73.380</td>\n",
              "      <td>220239000</td>\n",
              "      <td>24072.63213</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1614</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1982</td>\n",
              "      <td>74.650</td>\n",
              "      <td>232187835</td>\n",
              "      <td>25009.55914</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1615</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1987</td>\n",
              "      <td>75.020</td>\n",
              "      <td>242803533</td>\n",
              "      <td>29884.35041</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1616</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1992</td>\n",
              "      <td>76.090</td>\n",
              "      <td>256894189</td>\n",
              "      <td>32003.93224</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1617</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1997</td>\n",
              "      <td>76.810</td>\n",
              "      <td>272911760</td>\n",
              "      <td>35767.43303</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1618</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>2002</td>\n",
              "      <td>77.310</td>\n",
              "      <td>287675526</td>\n",
              "      <td>39097.09955</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1619</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>2007</td>\n",
              "      <td>78.242</td>\n",
              "      <td>301139947</td>\n",
              "      <td>42951.65309</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "            country continent  year  lifeExp        pop    gdpPercap\n",
              "1608  United States  Americas  1952   68.440  157553000  13990.48208\n",
              "1609  United States  Americas  1957   69.490  171984000  14847.12712\n",
              "1610  United States  Americas  1962   70.210  186538000  16173.14586\n",
              "1611  United States  Americas  1967   70.760  198712000  19530.36557\n",
              "1612  United States  Americas  1972   71.340  209896000  21806.03594\n",
              "1613  United States  Americas  1977   73.380  220239000  24072.63213\n",
              "1614  United States  Americas  1982   74.650  232187835  25009.55914\n",
              "1615  United States  Americas  1987   75.020  242803533  29884.35041\n",
              "1616  United States  Americas  1992   76.090  256894189  32003.93224\n",
              "1617  United States  Americas  1997   76.810  272911760  35767.43303\n",
              "1618  United States  Americas  2002   77.310  287675526  39097.09955\n",
              "1619  United States  Americas  2007   78.242  301139947  42951.65309"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 58,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df['country'] == 'United States'"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 59,
          "data": {
            "text/plain": [
              "0       False\n",
              "1       False\n",
              "2       False\n",
              "3       False\n",
              "4       False\n",
              "5       False\n",
              "6       False\n",
              "7       False\n",
              "8       False\n",
              "9       False\n",
              "10      False\n",
              "11      False\n",
              "12      False\n",
              "13      False\n",
              "14      False\n",
              "15      False\n",
              "16      False\n",
              "17      False\n",
              "18      False\n",
              "19      False\n",
              "20      False\n",
              "21      False\n",
              "22      False\n",
              "23      False\n",
              "24      False\n",
              "25      False\n",
              "26      False\n",
              "27      False\n",
              "28      False\n",
              "29      False\n",
              "        ...  \n",
              "1674    False\n",
              "1675    False\n",
              "1676    False\n",
              "1677    False\n",
              "1678    False\n",
              "1679    False\n",
              "1680    False\n",
              "1681    False\n",
              "1682    False\n",
              "1683    False\n",
              "1684    False\n",
              "1685    False\n",
              "1686    False\n",
              "1687    False\n",
              "1688    False\n",
              "1689    False\n",
              "1690    False\n",
              "1691    False\n",
              "1692    False\n",
              "1693    False\n",
              "1694    False\n",
              "1695    False\n",
              "1696    False\n",
              "1697    False\n",
              "1698    False\n",
              "1699    False\n",
              "1700    False\n",
              "1701    False\n",
              "1702    False\n",
              "1703    False\n",
              "Name: country, Length: 1704, dtype: bool"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 59,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.loc[(df['country'] == 'United States') & (df['year'] == 1982)]"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 61,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1614</th>\n",
              "      <td>United States</td>\n",
              "      <td>Americas</td>\n",
              "      <td>1982</td>\n",
              "      <td>74.65</td>\n",
              "      <td>232187835</td>\n",
              "      <td>25009.55914</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "            country continent  year  lifeExp        pop    gdpPercap\n",
              "1614  United States  Americas  1982    74.65  232187835  25009.55914"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 61,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 65,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>country</th>\n",
              "      <th>continent</th>\n",
              "      <th>year</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>pop</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1952</td>\n",
              "      <td>28.801</td>\n",
              "      <td>8425333</td>\n",
              "      <td>779.445314</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1957</td>\n",
              "      <td>30.332</td>\n",
              "      <td>9240934</td>\n",
              "      <td>820.853030</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1962</td>\n",
              "      <td>31.997</td>\n",
              "      <td>10267083</td>\n",
              "      <td>853.100710</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1967</td>\n",
              "      <td>34.020</td>\n",
              "      <td>11537966</td>\n",
              "      <td>836.197138</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Afghanistan</td>\n",
              "      <td>Asia</td>\n",
              "      <td>1972</td>\n",
              "      <td>36.088</td>\n",
              "      <td>13079460</td>\n",
              "      <td>739.981106</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "       country continent  year  lifeExp       pop   gdpPercap\n",
              "0  Afghanistan      Asia  1952   28.801   8425333  779.445314\n",
              "1  Afghanistan      Asia  1957   30.332   9240934  820.853030\n",
              "2  Afghanistan      Asia  1962   31.997  10267083  853.100710\n",
              "3  Afghanistan      Asia  1967   34.020  11537966  836.197138\n",
              "4  Afghanistan      Asia  1972   36.088  13079460  739.981106"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 65,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.groupby('year')['lifeExp'].mean()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 68,
          "data": {
            "text/plain": [
              "year\n",
              "1952    49.057620\n",
              "1957    51.507401\n",
              "1962    53.609249\n",
              "1967    55.678290\n",
              "1972    57.647386\n",
              "1977    59.570157\n",
              "1982    61.533197\n",
              "1987    63.212613\n",
              "1992    64.160338\n",
              "1997    65.014676\n",
              "2002    65.694923\n",
              "2007    67.007423\n",
              "Name: lifeExp, dtype: float64"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 68,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "import numpy as np\n",
        "df.groupby('year')['lifeExp'].agg(np.mean)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 70,
          "data": {
            "text/plain": [
              "year\n",
              "1952    49.057620\n",
              "1957    51.507401\n",
              "1962    53.609249\n",
              "1967    55.678290\n",
              "1972    57.647386\n",
              "1977    59.570157\n",
              "1982    61.533197\n",
              "1987    63.212613\n",
              "1992    64.160338\n",
              "1997    65.014676\n",
              "2002    65.694923\n",
              "2007    67.007423\n",
              "Name: lifeExp, dtype: float64"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 70,
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "df.groupby(['year', 'continent'])[['lifeExp', 'gdpPercap']].agg(np.mean).reset_index()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 72,
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>year</th>\n",
              "      <th>continent</th>\n",
              "      <th>lifeExp</th>\n",
              "      <th>gdpPercap</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>1952</td>\n",
              "      <td>Africa</td>\n",
              "      <td>39.135500</td>\n",
              "      <td>1252.572466</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1952</td>\n",
              "      <td>Americas</td>\n",
              "      <td>53.279840</td>\n",
              "      <td>4079.062552</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1952</td>\n",
              "      <td>Asia</td>\n",
              "      <td>46.314394</td>\n",
              "      <td>5195.484004</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1952</td>\n",
              "      <td>Europe</td>\n",
              "      <td>64.408500</td>\n",
              "      <td>5661.057435</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1952</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>69.255000</td>\n",
              "      <td>10298.085650</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>1957</td>\n",
              "      <td>Africa</td>\n",
              "      <td>41.266346</td>\n",
              "      <td>1385.236062</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>1957</td>\n",
              "      <td>Americas</td>\n",
              "      <td>55.960280</td>\n",
              "      <td>4616.043733</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>1957</td>\n",
              "      <td>Asia</td>\n",
              "      <td>49.318544</td>\n",
              "      <td>5787.732940</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>1957</td>\n",
              "      <td>Europe</td>\n",
              "      <td>66.703067</td>\n",
              "      <td>6963.012816</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>1957</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>70.295000</td>\n",
              "      <td>11598.522455</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>1962</td>\n",
              "      <td>Africa</td>\n",
              "      <td>43.319442</td>\n",
              "      <td>1598.078825</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>1962</td>\n",
              "      <td>Americas</td>\n",
              "      <td>58.398760</td>\n",
              "      <td>4901.541870</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12</th>\n",
              "      <td>1962</td>\n",
              "      <td>Asia</td>\n",
              "      <td>51.563223</td>\n",
              "      <td>5729.369625</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>13</th>\n",
              "      <td>1962</td>\n",
              "      <td>Europe</td>\n",
              "      <td>68.539233</td>\n",
              "      <td>8365.486814</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>14</th>\n",
              "      <td>1962</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>71.085000</td>\n",
              "      <td>12696.452430</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>15</th>\n",
              "      <td>1967</td>\n",
              "      <td>Africa</td>\n",
              "      <td>45.334538</td>\n",
              "      <td>2050.363801</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>16</th>\n",
              "      <td>1967</td>\n",
              "      <td>Americas</td>\n",
              "      <td>60.410920</td>\n",
              "      <td>5668.253496</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>17</th>\n",
              "      <td>1967</td>\n",
              "      <td>Asia</td>\n",
              "      <td>54.663640</td>\n",
              "      <td>5971.173374</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>18</th>\n",
              "      <td>1967</td>\n",
              "      <td>Europe</td>\n",
              "      <td>69.737600</td>\n",
              "      <td>10143.823757</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>19</th>\n",
              "      <td>1967</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>71.310000</td>\n",
              "      <td>14495.021790</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>20</th>\n",
              "      <td>1972</td>\n",
              "      <td>Africa</td>\n",
              "      <td>47.450942</td>\n",
              "      <td>2339.615674</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21</th>\n",
              "      <td>1972</td>\n",
              "      <td>Americas</td>\n",
              "      <td>62.394920</td>\n",
              "      <td>6491.334139</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>22</th>\n",
              "      <td>1972</td>\n",
              "      <td>Asia</td>\n",
              "      <td>57.319269</td>\n",
              "      <td>8187.468699</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>23</th>\n",
              "      <td>1972</td>\n",
              "      <td>Europe</td>\n",
              "      <td>70.775033</td>\n",
              "      <td>12479.575246</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>24</th>\n",
              "      <td>1972</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>71.910000</td>\n",
              "      <td>16417.333380</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>25</th>\n",
              "      <td>1977</td>\n",
              "      <td>Africa</td>\n",
              "      <td>49.580423</td>\n",
              "      <td>2585.938508</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>26</th>\n",
              "      <td>1977</td>\n",
              "      <td>Americas</td>\n",
              "      <td>64.391560</td>\n",
              "      <td>7352.007126</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>27</th>\n",
              "      <td>1977</td>\n",
              "      <td>Asia</td>\n",
              "      <td>59.610556</td>\n",
              "      <td>7791.314020</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>28</th>\n",
              "      <td>1977</td>\n",
              "      <td>Europe</td>\n",
              "      <td>71.937767</td>\n",
              "      <td>14283.979110</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>29</th>\n",
              "      <td>1977</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>72.855000</td>\n",
              "      <td>17283.957605</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>30</th>\n",
              "      <td>1982</td>\n",
              "      <td>Africa</td>\n",
              "      <td>51.592865</td>\n",
              "      <td>2481.592960</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>31</th>\n",
              "      <td>1982</td>\n",
              "      <td>Americas</td>\n",
              "      <td>66.228840</td>\n",
              "      <td>7506.737088</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>32</th>\n",
              "      <td>1982</td>\n",
              "      <td>Asia</td>\n",
              "      <td>62.617939</td>\n",
              "      <td>7434.135157</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>33</th>\n",
              "      <td>1982</td>\n",
              "      <td>Europe</td>\n",
              "      <td>72.806400</td>\n",
              "      <td>15617.896551</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>34</th>\n",
              "      <td>1982</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>74.290000</td>\n",
              "      <td>18554.709840</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>35</th>\n",
              "      <td>1987</td>\n",
              "      <td>Africa</td>\n",
              "      <td>53.344788</td>\n",
              "      <td>2282.668991</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>36</th>\n",
              "      <td>1987</td>\n",
              "      <td>Americas</td>\n",
              "      <td>68.090720</td>\n",
              "      <td>7793.400261</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>37</th>\n",
              "      <td>1987</td>\n",
              "      <td>Asia</td>\n",
              "      <td>64.851182</td>\n",
              "      <td>7608.226508</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>38</th>\n",
              "      <td>1987</td>\n",
              "      <td>Europe</td>\n",
              "      <td>73.642167</td>\n",
              "      <td>17214.310727</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>39</th>\n",
              "      <td>1987</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>75.320000</td>\n",
              "      <td>20448.040160</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>40</th>\n",
              "      <td>1992</td>\n",
              "      <td>Africa</td>\n",
              "      <td>53.629577</td>\n",
              "      <td>2281.810333</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>41</th>\n",
              "      <td>1992</td>\n",
              "      <td>Americas</td>\n",
              "      <td>69.568360</td>\n",
              "      <td>8044.934406</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>42</th>\n",
              "      <td>1992</td>\n",
              "      <td>Asia</td>\n",
              "      <td>66.537212</td>\n",
              "      <td>8639.690248</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>43</th>\n",
              "      <td>1992</td>\n",
              "      <td>Europe</td>\n",
              "      <td>74.440100</td>\n",
              "      <td>17061.568084</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>44</th>\n",
              "      <td>1992</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>76.945000</td>\n",
              "      <td>20894.045885</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>45</th>\n",
              "      <td>1997</td>\n",
              "      <td>Africa</td>\n",
              "      <td>53.598269</td>\n",
              "      <td>2378.759555</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>46</th>\n",
              "      <td>1997</td>\n",
              "      <td>Americas</td>\n",
              "      <td>71.150480</td>\n",
              "      <td>8889.300863</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>47</th>\n",
              "      <td>1997</td>\n",
              "      <td>Asia</td>\n",
              "      <td>68.020515</td>\n",
              "      <td>9834.093295</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>48</th>\n",
              "      <td>1997</td>\n",
              "      <td>Europe</td>\n",
              "      <td>75.505167</td>\n",
              "      <td>19076.781802</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>49</th>\n",
              "      <td>1997</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>78.190000</td>\n",
              "      <td>24024.175170</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>50</th>\n",
              "      <td>2002</td>\n",
              "      <td>Africa</td>\n",
              "      <td>53.325231</td>\n",
              "      <td>2599.385159</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>51</th>\n",
              "      <td>2002</td>\n",
              "      <td>Americas</td>\n",
              "      <td>72.422040</td>\n",
              "      <td>9287.677107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>52</th>\n",
              "      <td>2002</td>\n",
              "      <td>Asia</td>\n",
              "      <td>69.233879</td>\n",
              "      <td>10174.090397</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>53</th>\n",
              "      <td>2002</td>\n",
              "      <td>Europe</td>\n",
              "      <td>76.700600</td>\n",
              "      <td>21711.732422</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>54</th>\n",
              "      <td>2002</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>79.740000</td>\n",
              "      <td>26938.778040</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>55</th>\n",
              "      <td>2007</td>\n",
              "      <td>Africa</td>\n",
              "      <td>54.806038</td>\n",
              "      <td>3089.032605</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>56</th>\n",
              "      <td>2007</td>\n",
              "      <td>Americas</td>\n",
              "      <td>73.608120</td>\n",
              "      <td>11003.031625</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>57</th>\n",
              "      <td>2007</td>\n",
              "      <td>Asia</td>\n",
              "      <td>70.728485</td>\n",
              "      <td>12473.026870</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>58</th>\n",
              "      <td>2007</td>\n",
              "      <td>Europe</td>\n",
              "      <td>77.648600</td>\n",
              "      <td>25054.481636</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>59</th>\n",
              "      <td>2007</td>\n",
              "      <td>Oceania</td>\n",
              "      <td>80.719500</td>\n",
              "      <td>29810.188275</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "    year continent    lifeExp     gdpPercap\n",
              "0   1952    Africa  39.135500   1252.572466\n",
              "1   1952  Americas  53.279840   4079.062552\n",
              "2   1952      Asia  46.314394   5195.484004\n",
              "3   1952    Europe  64.408500   5661.057435\n",
              "4   1952   Oceania  69.255000  10298.085650\n",
              "5   1957    Africa  41.266346   1385.236062\n",
              "6   1957  Americas  55.960280   4616.043733\n",
              "7   1957      Asia  49.318544   5787.732940\n",
              "8   1957    Europe  66.703067   6963.012816\n",
              "9   1957   Oceania  70.295000  11598.522455\n",
              "10  1962    Africa  43.319442   1598.078825\n",
              "11  1962  Americas  58.398760   4901.541870\n",
              "12  1962      Asia  51.563223   5729.369625\n",
              "13  1962    Europe  68.539233   8365.486814\n",
              "14  1962   Oceania  71.085000  12696.452430\n",
              "15  1967    Africa  45.334538   2050.363801\n",
              "16  1967  Americas  60.410920   5668.253496\n",
              "17  1967      Asia  54.663640   5971.173374\n",
              "18  1967    Europe  69.737600  10143.823757\n",
              "19  1967   Oceania  71.310000  14495.021790\n",
              "20  1972    Africa  47.450942   2339.615674\n",
              "21  1972  Americas  62.394920   6491.334139\n",
              "22  1972      Asia  57.319269   8187.468699\n",
              "23  1972    Europe  70.775033  12479.575246\n",
              "24  1972   Oceania  71.910000  16417.333380\n",
              "25  1977    Africa  49.580423   2585.938508\n",
              "26  1977  Americas  64.391560   7352.007126\n",
              "27  1977      Asia  59.610556   7791.314020\n",
              "28  1977    Europe  71.937767  14283.979110\n",
              "29  1977   Oceania  72.855000  17283.957605\n",
              "30  1982    Africa  51.592865   2481.592960\n",
              "31  1982  Americas  66.228840   7506.737088\n",
              "32  1982      Asia  62.617939   7434.135157\n",
              "33  1982    Europe  72.806400  15617.896551\n",
              "34  1982   Oceania  74.290000  18554.709840\n",
              "35  1987    Africa  53.344788   2282.668991\n",
              "36  1987  Americas  68.090720   7793.400261\n",
              "37  1987      Asia  64.851182   7608.226508\n",
              "38  1987    Europe  73.642167  17214.310727\n",
              "39  1987   Oceania  75.320000  20448.040160\n",
              "40  1992    Africa  53.629577   2281.810333\n",
              "41  1992  Americas  69.568360   8044.934406\n",
              "42  1992      Asia  66.537212   8639.690248\n",
              "43  1992    Europe  74.440100  17061.568084\n",
              "44  1992   Oceania  76.945000  20894.045885\n",
              "45  1997    Africa  53.598269   2378.759555\n",
              "46  1997  Americas  71.150480   8889.300863\n",
              "47  1997      Asia  68.020515   9834.093295\n",
              "48  1997    Europe  75.505167  19076.781802\n",
              "49  1997   Oceania  78.190000  24024.175170\n",
              "50  2002    Africa  53.325231   2599.385159\n",
              "51  2002  Americas  72.422040   9287.677107\n",
              "52  2002      Asia  69.233879  10174.090397\n",
              "53  2002    Europe  76.700600  21711.732422\n",
              "54  2002   Oceania  79.740000  26938.778040\n",
              "55  2007    Africa  54.806038   3089.032605\n",
              "56  2007  Americas  73.608120  11003.031625\n",
              "57  2007      Asia  70.728485  12473.026870\n",
              "58  2007    Europe  77.648600  25054.481636\n",
              "59  2007   Oceania  80.719500  29810.188275"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 72,
      "metadata": {}
    }
  ],
  "metadata": {
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python",
      "version": "3.7.3",
      "mimetype": "text/x-python",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "pygments_lexer": "ipython3",
      "nbconvert_exporter": "python",
      "file_extension": ".py"
    },
    "kernel_info": {
      "name": "python3"
    },
    "nteract": {
      "version": "0.14.3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 2
}